domain has recently been removed from our list, but with a watch still in
flight. This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
enum_domains();
else if (sscanf(vec[XS_WATCH_TOKEN], "dom%u", &domid) == 1) {
dom = lookup_domain(domid);
- if (dom->is_dead == false)
+ /* We may get watches firing for domains that have recently
+ been removed, so dom may be NULL here. */
+ if (dom && dom->is_dead == false)
domain_create_ring(dom);
}